/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.javatrainning.duongnt.b1;

import java.util.Scanner;

/**
 *
 * @author ThuyDuong
 */
public class Bai1Muc1Ktrangto {

   public static boolean ngto(int a) {
        if(a<=1) return false;
        for (int i = 2; i <= Math.sqrt(a); i++) 
        if (a % i == 0)
         return false;
        return true;
    }

    public static void main(String[] args) {
        int a;
        System.out.println("nhap a");
        Scanner sc = new Scanner(System.in);
        a = sc.nextInt();
        if(ngto(a)) System.out.println(a+" la so nguyen to");
        else System.out.println(a+" khong la so nguyen to");
    }
}
